package com.wuyoucar.service.impl;

import com.wuyoucar.entity.TUser;
import com.wuyoucar.mapper.AdminLoginMapper;
import com.wuyoucar.service.AdminLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminLoginServiceImpl implements AdminLoginService {
    @Autowired
    private AdminLoginMapper adminLoginMapper;

    //管理员账号密码登录
    @Override
    public TUser adminLogin(TUser tUser) {
        TUser user = adminLoginMapper.adminLogon(tUser);
        //判断管理员名称是否存在,并且密码相对应
        if (user != null) {
            return user;
        }
        return null;
    }
}
